package com.hs.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Collections;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ClassQaAnswer {
//            |      id       |   INT    |   编号   |          主键，自增          |
//            | :-----------: | :------: | :------: | :--------------------------: |
//            | answerContent |   TEXT   | 回复内容 |             非空             |
//            |    userId     |   INT    | 用户 id  |     非空，关联用户表外键     |
//            |     time      | DATETIME |   时间   |      非空，记录回复时刻      |
//            |  questionId   |   INT    | 问题 id  | 非空，关联课堂交流问题表外键 |
    private int id;
    private String answerContent;
    private int userId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date time;
    private int questionId;
    private User user;
    private ClassQaQuestion classqaquestion;
}
